package cn.edu.scau.cmi.wujiaxian.exercise9;

public class Example9_7 {
	

	public static void main(String[] args) {
		byte d[] = "Java你好".getBytes();
		System.out.println(d.length);
		String s = new String(d, 6, 2); //获取字节数组的前n位并转换成字符串类型
		System.out.println(s);
		s = new String(d, 0, 6);
		System.out.println(s);
	}
	
}
